//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.restaurant.application.shop.support;

import com.google.common.collect.Lists;
import com.nebutown.generation.Convert;
import com.nebutown.generation.PickableBean;
import java.util.List;
import java.util.stream.Collectors;

public class ShopData implements PickableBean {
    public static final String FN_ID = "id";
    public static final String FN_NAME = "name";
    public static final String FN_IMGURL = "imgUrl";
    public static final String FN_PHONE = "phone";
    public static final String FN_MAIL = "mail";
    public static final String FN_ENTITYID = "entityId";
    public static final String FN_SUPPORT2D = "support2d";
    public static final String FN_ADDRESS = "address";
    public static final String FN_LATITUDE = "latitude";
    public static final String FN_LONGITUDE = "longitude";
    public static final String FN_CREATETIME = "createTime";
    public static final String FN_MODIFYTIME = "modifyTime";
    public static final List<String> FIELD_NAMES = Lists.newArrayList(new String[]{"id", "name", "imgUrl", "phone", "mail", "entityId", "support2d", "address", "latitude", "longitude", "createTime", "modifyTime"});
    private String id;
    private String name;
    private String imgUrl;
    private String phone;
    private String mail;
    private String entityId;
    private Boolean support2d;
    private List<String> address;
    private Double latitude;
    private Double longitude;
    private Long createTime;
    private Long modifyTime;

    public ShopData(String id, String name, String imgUrl, String phone, String mail, String entityId, Boolean support2d, List<String> address, Double latitude, Double longitude, Long createTime, Long modifyTime) {
        this.setId(id);
        this.setName(name);
        this.setImgUrl(imgUrl);
        this.setPhone(phone);
        this.setMail(mail);
        this.setEntityId(entityId);
        this.setSupport2d(support2d);
        this.setAddress(address);
        this.setLatitude(latitude);
        this.setLongitude(longitude);
        this.setCreateTime(createTime);
        this.setModifyTime(modifyTime);
    }

    public ShopData() {
    }

    public ShopData duplicate() {
        ShopData result = new ShopData();
        result.id = this.id;
        result.name = this.name;
        result.imgUrl = this.imgUrl;
        result.phone = this.phone;
        result.mail = this.mail;
        result.entityId = this.entityId;
        result.support2d = this.support2d;
        result.address = this.address == null ? null : (List)this.address.stream().map((e1) -> {
            return e1;
        }).collect(Collectors.toList());
        result.latitude = this.latitude;
        result.longitude = this.longitude;
        result.createTime = this.createTime;
        result.modifyTime = this.modifyTime;
        return result;
    }

    public String toString() {
        return Convert.toJson(this);
    }

    public String getId() {
        return this.id;
    }

    public void setId(String value) {
        this.id = value;
    }

    public ShopData withId(String value) {
        this.setId(value);
        return this;
    }

    public ShopData withId(String value, String defaultValue) {
        this.setId(value == null ? defaultValue : value);
        return this;
    }

    public String getName() {
        return this.name;
    }

    public void setName(String value) {
        this.name = value;
    }

    public ShopData withName(String value) {
        this.setName(value);
        return this;
    }

    public ShopData withName(String value, String defaultValue) {
        this.setName(value == null ? defaultValue : value);
        return this;
    }

    public String getImgUrl() {
        return this.imgUrl;
    }

    public void setImgUrl(String value) {
        this.imgUrl = value;
    }

    public ShopData withImgUrl(String value) {
        this.setImgUrl(value);
        return this;
    }

    public ShopData withImgUrl(String value, String defaultValue) {
        this.setImgUrl(value == null ? defaultValue : value);
        return this;
    }

    public String getPhone() {
        return this.phone;
    }

    public void setPhone(String value) {
        this.phone = value;
    }

    public ShopData withPhone(String value) {
        this.setPhone(value);
        return this;
    }

    public ShopData withPhone(String value, String defaultValue) {
        this.setPhone(value == null ? defaultValue : value);
        return this;
    }

    public String getMail() {
        return this.mail;
    }

    public void setMail(String value) {
        this.mail = value;
    }

    public ShopData withMail(String value) {
        this.setMail(value);
        return this;
    }

    public ShopData withMail(String value, String defaultValue) {
        this.setMail(value == null ? defaultValue : value);
        return this;
    }

    public String getEntityId() {
        return this.entityId;
    }

    public void setEntityId(String value) {
        this.entityId = value;
    }

    public ShopData withEntityId(String value) {
        this.setEntityId(value);
        return this;
    }

    public ShopData withEntityId(String value, String defaultValue) {
        this.setEntityId(value == null ? defaultValue : value);
        return this;
    }

    public Boolean getSupport2d() {
        return this.support2d;
    }

    public void setSupport2d(Boolean value) {
        this.support2d = value;
    }

    public ShopData withSupport2d(Boolean value) {
        this.setSupport2d(value);
        return this;
    }

    public ShopData withSupport2d(Boolean value, Boolean defaultValue) {
        this.setSupport2d(value == null ? defaultValue : value);
        return this;
    }

    public List<String> getAddress() {
        if (this.address == null) {
            this.address = Lists.newArrayList();
        }

        return this.address;
    }

    public void setAddress(List<String> value) {
        this.address = value;
    }

    public ShopData withAddress(List<String> value) {
        this.setAddress(value);
        return this;
    }

    public ShopData withAddress(List<String> value, List<String> defaultValue) {
        this.setAddress(value == null ? defaultValue : value);
        return this;
    }

    public ShopData addAddress(String value) {
        if (this.address == null) {
            this.address = Lists.newArrayList();
        }

        this.address.add(value);
        return this;
    }

    public Double getLatitude() {
        return this.latitude;
    }

    public void setLatitude(Double value) {
        this.latitude = value;
    }

    public ShopData withLatitude(Double value) {
        this.setLatitude(value);
        return this;
    }

    public ShopData withLatitude(Double value, Double defaultValue) {
        this.setLatitude(value == null ? defaultValue : value);
        return this;
    }

    public Double getLongitude() {
        return this.longitude;
    }

    public void setLongitude(Double value) {
        this.longitude = value;
    }

    public ShopData withLongitude(Double value) {
        this.setLongitude(value);
        return this;
    }

    public ShopData withLongitude(Double value, Double defaultValue) {
        this.setLongitude(value == null ? defaultValue : value);
        return this;
    }

    public Long getCreateTime() {
        return this.createTime;
    }

    public void setCreateTime(Long value) {
        this.createTime = value;
    }

    public ShopData withCreateTime(Long value) {
        this.setCreateTime(value);
        return this;
    }

    public ShopData withCreateTime(Long value, Long defaultValue) {
        this.setCreateTime(value == null ? defaultValue : value);
        return this;
    }

    public Long getModifyTime() {
        return this.modifyTime;
    }

    public void setModifyTime(Long value) {
        this.modifyTime = value;
    }

    public ShopData withModifyTime(Long value) {
        this.setModifyTime(value);
        return this;
    }

    public ShopData withModifyTime(Long value, Long defaultValue) {
        this.setModifyTime(value == null ? defaultValue : value);
        return this;
    }

    public Object getValueOf(String name) {
        byte var3 = -1;
        switch(name.hashCode()) {
            case -2102099874:
                if (name.equals("entityId")) {
                    var3 = 5;
                }
                break;
            case -1439978388:
                if (name.equals("latitude")) {
                    var3 = 8;
                }
                break;
            case -1185088852:
                if (name.equals("imgUrl")) {
                    var3 = 2;
                }
                break;
            case -1147692044:
                if (name.equals("address")) {
                    var3 = 7;
                }
                break;
            case -19804543:
                if (name.equals("support2d")) {
                    var3 = 6;
                }
                break;
            case 3355:
                if (name.equals("id")) {
                    var3 = 0;
                }
                break;
            case 3343799:
                if (name.equals("mail")) {
                    var3 = 4;
                }
                break;
            case 3373707:
                if (name.equals("name")) {
                    var3 = 1;
                }
                break;
            case 106642798:
                if (name.equals("phone")) {
                    var3 = 3;
                }
                break;
            case 137365935:
                if (name.equals("longitude")) {
                    var3 = 9;
                }
                break;
            case 1211388583:
                if (name.equals("modifyTime")) {
                    var3 = 11;
                }
                break;
            case 1369213417:
                if (name.equals("createTime")) {
                    var3 = 10;
                }
        }

        switch(var3) {
            case 0:
                return this.getId();
            case 1:
                return this.getName();
            case 2:
                return this.getImgUrl();
            case 3:
                return this.getPhone();
            case 4:
                return this.getMail();
            case 5:
                return this.getEntityId();
            case 6:
                return this.getSupport2d();
            case 7:
                return this.getAddress();
            case 8:
                return this.getLatitude();
            case 9:
                return this.getLongitude();
            case 10:
                return this.getCreateTime();
            case 11:
                return this.getModifyTime();
            default:
                return null;
        }
    }

    public void setValueOf(String name, Object value) {
        byte var4 = -1;
        switch(name.hashCode()) {
            case -2102099874:
                if (name.equals("entityId")) {
                    var4 = 5;
                }
                break;
            case -1439978388:
                if (name.equals("latitude")) {
                    var4 = 8;
                }
                break;
            case -1185088852:
                if (name.equals("imgUrl")) {
                    var4 = 2;
                }
                break;
            case -1147692044:
                if (name.equals("address")) {
                    var4 = 7;
                }
                break;
            case -19804543:
                if (name.equals("support2d")) {
                    var4 = 6;
                }
                break;
            case 3355:
                if (name.equals("id")) {
                    var4 = 0;
                }
                break;
            case 3343799:
                if (name.equals("mail")) {
                    var4 = 4;
                }
                break;
            case 3373707:
                if (name.equals("name")) {
                    var4 = 1;
                }
                break;
            case 106642798:
                if (name.equals("phone")) {
                    var4 = 3;
                }
                break;
            case 137365935:
                if (name.equals("longitude")) {
                    var4 = 9;
                }
                break;
            case 1211388583:
                if (name.equals("modifyTime")) {
                    var4 = 11;
                }
                break;
            case 1369213417:
                if (name.equals("createTime")) {
                    var4 = 10;
                }
        }

        switch(var4) {
            case 0:
                this.setId((String)value);
                return;
            case 1:
                this.setName((String)value);
                return;
            case 2:
                this.setImgUrl((String)value);
                return;
            case 3:
                this.setPhone((String)value);
                return;
            case 4:
                this.setMail((String)value);
                return;
            case 5:
                this.setEntityId((String)value);
                return;
            case 6:
                this.setSupport2d((Boolean)value);
                return;
            case 7:
                this.setAddress((List)value);
                return;
            case 8:
                this.setLatitude((Double)value);
                return;
            case 9:
                this.setLongitude((Double)value);
                return;
            case 10:
                this.setCreateTime((Long)value);
                return;
            case 11:
                this.setModifyTime((Long)value);
                return;
            default:
        }
    }

    public boolean hasField(String name) {
        return FIELD_NAMES.contains(name);
    }

    public int hashCode() {
        return this.signature().hashCode();
    }

    public boolean equals(Object o) {
        return !(o instanceof ShopData) ? false : this.signature().equals(((ShopData)o).signature());
    }

    public String signature() {
        throw new RuntimeException("Bean ShopData has no signature defined, no hash code or equals possible.");
    }
}
